$OpenBSD: patch-src_unix_ifnet_c,v 1.4 2017/06/04 11:45:04 stsp Exp $

Index: src/unix/ifnet.c
--- src/unix/ifnet.c.orig
+++ src/unix/ifnet.c
@@ -632,7 +632,10 @@ chk_if_up(struct olsr_if *iface, int debuglvl __attrib
     /* Find broadcast address */
     if (iface->cnf->ipv4_multicast.v4.s_addr) {
       /* Specified broadcast */
-      memcpy(&((struct sockaddr_in *)&ifs.int_broadaddr)->sin_addr.s_addr, &iface->cnf->ipv4_multicast.v4, sizeof(uint32_t));
+      struct sockaddr_in *sin = &ifs.int_broadaddr;
+      memcpy(&sin->sin_addr.s_addr, &iface->cnf->ipv4_multicast.v4, sizeof(uint32_t));
+      sin->sin_len = sizeof(*sin);
+      sin->sin_family = AF_INET;
     } else {
       /* Autodetect */
       struct sockaddr* ifrb;
